<div class="container">
    <div class="row">
        <div id="show" class="span12">
            <?php
            if (isset($query) && count($query) > 0) {
                ?>
                <h1>Data Guru</h1>
                <table width="400" border="1" class="table table-striped">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Kelas</th>
                            <th>Materi</th>
                            <th>Type Soal</th>
                            <th>Jumlah Soal</th>
                            <th>Jumlah Opsi</th>
                            <th>Mode Acak</th>
                            <th>Waktu</th>
                            <th>Nilai</th>
                        </tr>
                    </thead>
                    <?php
                    $i = 0;
                    foreach ($query as $row) {
                        $i++;
                        echo "<tr class=\"record\">";
                        echo "<td>$i</td>";
                        echo "<td>$row->kelas</td>";
                        echo "<td>$row->materi</td>";
                        echo "<td>$row->type_soal</td>";
                        echo "<td>$row->jumlah_soal</td>";
                        echo "<td>$row->jumlah_opsi</td>";
                        echo "<td>$row->mode_acak</td>";
                        echo "<td>$row->waktu</td>";
                        echo "<td>" . anchor('guru/daftarnilai/' . $row->id . '', 'Daftar Nilai') . "</td>";
                        echo "</tr>";
                    }
                    ?>
                </table>
                <?php
            }
            ?>
        </div>
    </div>
</div>